﻿CREATE TABLE [dbo].[PuntosRef_Sector](
	[id_punto_ref_sector] [int] IDENTITY(1,1) NOT NULL,
	[id_sector] [int] NULL,
	[id_punt_ref] [int] NULL,
 CONSTRAINT [PK_PuntosRef_Sector] PRIMARY KEY CLUSTERED 
(
	[id_punto_ref_sector] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  ForeignKey [FK_PuntosRef_Sector_PuntosReferencia]    Script Date: 11/12/2012 16:56:27 ******/
ALTER TABLE [dbo].[PuntosRef_Sector]  WITH CHECK ADD  CONSTRAINT [FK_PuntosRef_Sector_PuntosReferencia] FOREIGN KEY([id_punt_ref])
REFERENCES [dbo].[PuntosReferencia] ([id_punt_ref])
GO

ALTER TABLE [dbo].[PuntosRef_Sector] CHECK CONSTRAINT [FK_PuntosRef_Sector_PuntosReferencia]
GO
/****** Object:  ForeignKey [FK_PuntosRef_Sector_Sector]    Script Date: 11/12/2012 16:56:27 ******/
ALTER TABLE [dbo].[PuntosRef_Sector]  WITH CHECK ADD  CONSTRAINT [FK_PuntosRef_Sector_Sector] FOREIGN KEY([id_sector])
REFERENCES [dbo].[Sector] ([id_sector])
GO

ALTER TABLE [dbo].[PuntosRef_Sector] CHECK CONSTRAINT [FK_PuntosRef_Sector_Sector]